; ORIGINAL: 3dt2.1/examples/spin.scm
; $Id: spin.scm,v 1.4 1997/04/30 20:24:20 jread Exp $
;- spin.scm -------------------------------------------------------
; Rotate the view once around so that you can see all of the geometry.
; Slow the process down to a visually appealing rate with system:sleep.
;------------------------------------------------------------------
(define spin
  (lambda (view-name)
    (do ((angle 0 (+ angle 1))) ((= angle 360))
      (begin
        (view:set-eye (position:transform (view:eye view-name)
           (transform:rotation (view:target view-name)(gvector 1 1 1) 1)))
        (view:set-up (gvector:transform (view:up view-name)
           (transform:rotation (position 0 0 0) (gvector 1 1 1) 1)))
        (view:refresh view-name)
        (system:sleep 10)
      )
    )
  )
)
